home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Popular Request
/
By Popular Request (Arsenal Computer)(SysOptics Distribution System).ISO
/
amiga4
/
sclk1_72.lha
/
SClock
/
Source
/
misc
/
sc_create.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-12-07
|
590b
|
43 lines
/* The magic "SinCos" creator! */
#include <exec/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
void main(void)
{
UWORD a;
WORD val;
printf("WORD SinTab[60] =\n{\n\t");
for (a=0; a<360; a+=6)
{
val = (sin((a / 180.0) * 3.14159) * 1024);
printf("%d, ", val);
if (((a + 1) % 7) == 0)
printf("\n\t");
}
printf("\n}\n\nWORD CosTab[60] =\n{\n\t");
for (a=0; a<360; a+=6)
{
val = (cos((a / 180.0) * 3.14159) * 1024);
printf("%d, ", val);
if (((a + 1) % 7) == 0)
printf("\n\t");
}
printf("\n}\n");
}
/* End Of File */